package de.koller.altitude.engine.entity;

import de.koller.aframe.util.physics.Location;
import de.koller.aframe.util.physics.Movement;
import de.koller.aframe.util.physics.Size;
import de.koller.altitude.engine.physics.Physics;

public class MovingObject {

	/** Mitte unten der SizeBounds */
	public final Location location = new Location();
	public final Movement movement = new Movement();
	public final Size size = new Size();
	
	public final PhysicsParameters physicsParameters = new PhysicsParameters();
	
	public void registerPhysics( Physics physics ) {
		physics.movingObjects.add( this );
	}
	
	public void unregisterPhysics( Physics physics ) {
		physics.movingObjects.remove( this );
	}
	
	public void afterPhysicsSteps() {
		if( physicsParameters.resetXZVelocity ) {
			movement.velocity.x = 0;
			movement.velocity.z = 0;
		}
	}
	
}
